﻿@using ABC.Domain.Entities
@model List<ObjectOfInsurance>
<div class="modal hide " id="objects-list">
    <div class="modal-header">
        <button data-dismiss="modal" class="close">
            ×</button>
        <h3>
            Объекты страхования</h3>
    </div>
    <div class="modal-body">
        <table class="table table-bordered table-striped">
            <thead>
                <tr>
                    <th class="col-1">
                    </th>
                    <th>
                        Объект страхования
                    </th>
                    <th>
                        Страхователь
                    </th>
                </tr>
            </thead>
            <tbody>
                @foreach (var @obj in Model)
                {
                    <tr>
                        <td>
                            <input type="radio" name="object" value="@obj.Id">
                        </td>
                        <td>@string.Format("{0} {1}, {2}", @obj.Manufacture, @obj.Model, @obj.Release)</td>
                        <td>
                            @obj.FullNameInsurant
                        </td>
                    </tr>
                }
            </tbody>
        </table>
    </div>
    <div class="modal-footer">
        <button class="btn btn-primary" onclick="SelectObject();">
            Выбрать объект</button>
    </div>
</div>
